package com.xoa.dao.workflow;

import com.xoa.model.workflow.*;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface FlowSortMapper {
    int countByExample(FlowSortExample example);

    int deleteByExample(FlowSortExample example);

    int deleteByPrimaryKey(Integer sortId);

    int insert(FlowSort record);

    int insertSelective(FlowSort record);

    List<FlowSort> selectByExample(FlowSortExample example);

    List<FlowSort> selectAllFlowSort(Integer deptId);
    List<FlowSort> selectAllFlowSortAdmin();

    int getChildNumber(Integer sortId);

    int  selectflowSortNum(Integer flowId);
    List<FlowSort> getChildDatas(@Param("sortId")  Integer sortId);
    List<FlowSort> getSonChildDatas(@Param("sortId")  Integer sortId);

    Integer selectNoflowSort(Integer deptId);

    FlowSort selectByPrimaryKey(Integer sortId);

    int updateByExampleSelective(@Param("record") FlowSort record, @Param("example") FlowSortExample example);

    int updateByExample(@Param("record") FlowSort record, @Param("example") FlowSortExample example);

    int updateByPrimaryKeySelective(FlowSort record);

    int updateByPrimaryKey(FlowSort record);

    List<FlowSort> selectFlowSortByAuth(Map<String,Object> map);
    List<FlowSort> documentFlowSortByAuth(Map<String,Object> map);



    List<FlowSort> selectAllFs(Integer deptId);
    List<FlowSort> selectAllFsAdmin();


    int  countAllFs(Integer flowSort);

    List<FlowSort> selectAllFsDocument(Map<String,String> map );
    List<FlowSort> selectAllFsDocumentAdmin();



    List<FlowTypeModel>selectByFlowType();

    //lr模拟多级分类
    List<FlowSort> lrSelectAll(Map maps);

    //lr  根据flowId集合获取上级菜单 flowReportResult用
    List<FlowSort> getFlowSortByFlowIdList(@Param("flowIdList") List<Integer> flowIdList);

    FlowSort getFlowSortByFlowId(Integer flowId);

    String selectType(Integer flowId);

    //根据父级ID查询
    List<FlowSort> findSortParent(@Param("sortParent") Integer sortParent,@Param("deptId") Integer deptId);
}